from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
import blog_manage.manage_views.article_view as av
import blog_manage.manage_views.category_view as cv
import blog_manage.manage_views.comments_view as cmv
import blog_manage.manage_views.login_view as lv

# 博客后台首页
urlpatterns=[

    path('login/',lv.LoginView.as_view(),name='login'),
    path('get_back/',lv.GetBack.as_view(),name='get_back'),
    path('register/',lv.RegisterView.as_view(),name='register'),
    path('send_code/',lv.SendCode.as_view(),name='send_code'),

    # path('',av.ManageHomeView.as_view(),name='manage_home'),
    path('',av.HomeView,name='manage_home'),
    path('add/',av.ManageAddArticleView.as_view(),name='add_artice'),
    path('update/<int:id>',av.ManageUpdateArticleView.as_view(),name='update_artice'),
    path('del/<int:id>',av.ManageDeleteArticleView.as_view(),name='delete_artice'),
    path('del/batch/',av.ManageBatchDelArticleView.as_view(),name='batch_del_artice'),

    path('category/',cv.ManageCategoryView.as_view(),name='manage_category'),
    path('category/add/',cv.ManageAddCategoryView.as_view(),name='manage_category'),
    path('category/update/<int:id>',cv.ManageUpdateCategoryView.as_view(),name='update_category'),
    path('category/del/<int:id>',cv.ManageDelCategoryView.as_view(),name='del_category'),

    path('comments/<int:id>',cmv.ManageCommentsView.as_view(),name='manage_comments'),
    path('comments/add/<int:id>',cmv.ManageAddCommentsView.as_view(),name='add_comments'),
    path('comments/update/<int:id>',cmv.ManageUpdateCommentsView.as_view(),name='update_comments'),
    path('comments/del/<int:id>',cmv.ManageDelCommentsView.as_view(),name='del_comments'),
]

